package db;

/**
 *
 * Provides information about MySQL Connections to allow starting by providing only the host name
 * and the necessary password.
 *
 * Just for convenience.
 *
 * Last Modified: Aug 11, 2010<br>
 * Version: 1.0<br>
 * Created: Aug 11, 2010<br>
 * Author: Katie Kuksenok (katie.kuksenok@gmail.com)
 *
 * @author Katie
 */
public class Connections {

    /**
     * Retrieves the connection data given the keyword,
     * such as "eleanor" or "kettle"
     * @param keyword
     * @return
     */
    public static String[] getConnectionInfo(String keyword){
        if(keyword.equals("kettle")){
            return localKettle;
        }else if(keyword.equals("rkettle")){
            return remoteKettle;
        }else if(keyword.equals("eleanor")){
            return localEleanor;
        }else if(keyword.equals("wisteria")){
            return localWisteria;
        }
        System.out.println("Unknown host given.");
        return null;
    }

    /**
     * For connection on Kettle's MySQL, we can start by
     * java -jar HEDBServer.jar kettle PASSWD
     * Works only if running it on kettle, as well
     */
    public static final String[] localKettle = new String[]{
        "localhost",
        "chronicweb_data",
        "katiek"
    };

        /**
     * For connection on Kettle's MySQL, we can start by
     * java -jar HEDBServer.jar kettle PASSWD
     */
    public static final String[] remoteKettle = new String[]{
        "kettle.cmubi.org",
        "chronicweb_data",
        "katiek"
    };
        /**
     * For connection on Wisteria's MySQL locally
     */
    public static final String[] localWisteria = new String[]{
        "localhost",
        "clever_db",
        "root"
    };

    /**
     * For connection on Katie's laptop's MySQL, we can start by
     * java -jar HEDBServer.jar eleanor PASSWD
     * Works only if running it on eleanor, as well
     */
    public static final String[] localEleanor = new String[]{
        "localhost",
        "curetogethernew",
        "root"
    };
}
